<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>书库_逸云书院</title>
    <link rel="shortcut icon" href=".//img/yyfavicon.ico"></title>
    <link rel="stylesheet" href="./css/b-public.css">
    <link rel="stylesheet" href="./css/b-booklist.css">
    <link href="https://unpkg.com/layui@2.11.5/dist/css/layui.css" rel="stylesheet">
</head>
<body>
    <div class="topTitle">
        <div class="topCenter">
            <div class="topLeft">
                 <a href="./wenxue.html">磨铁文学</a>
                 <a href="./hzhlaikan.html">来看中文网</a>
                 <a href="./jinwenshouye.html">锦文小说网</a>
                 <a href="./momoMain.html">墨墨言情网</a>
                <a class="active">逸云书院</a>

            </div>
            <div class="topRight">
                <a href="./login.html">登录</a>
                <a href="./login.html">注册</a>
               <a class="phone">手机版
                <div class="pho-tabs">
                    <em></em>
                    <ul class="hovers">
                        <li>
                            <img class="img1" src="./img/b-phon.jpg" alt="">
                            <div class="rightTop">
                                <p class="p1">磨铁阅读</p>
                                <p class="p2">让阅读更精彩</p>
                                <div class="imgs">
                                    <img src="./img/bk-apple.png" alt="">
                                    <img src="./img/bk-green.png" alt="">
                                </div>
                            </div>
                        </li>
                         <li>
                            <img class="img1" src="./img/b-phos1.jpg" alt="">
                            <div class="rightTop">
                                <p class="p1">关注磨铁微信</p>
                                <p class="p2">微信扫一扫关注</p>
                            </div>
                        </li>
                    </ul>
                </div>
               </a>
            </div>
        </div>
    </div>
    <div class="logo">
        <div class="logoCeter">
            <img src="./img/bimg1.png" alt="">
            <div style="display: flex;">
                <div class="search">
                    <input type="text" oninput="newSearch()" name="" id="" placeholder="找书">
                    <p></p>
                    <span></span>
                </div>
                 <ul class="searchList">
                  
                </ul>
                <div class="bookShlef">
                    <span></span>
                    <p>我的书架</p>
                </div>
            </div>
           
        </div>
    </div>
     <div class="firstNav">
        <ul>
           <li><a href="bookIndex.html">首页</a></li>
            <li class="active1"><a href="b-booklists.html">书库</a></li>
            <li><a href="b-bookrank.html">排行</a></li>
            <li><a href="b-author.html">作家专区</a></li>
            <li><a href="b-aware.html">福利</a><img class="dong" src="" alt=""></li>
        </ul>
    </div>
    <div class="container">
        <div class="books">
            <div class="leftbar">
                <div class="select">
                    <span class="selected">已选</span>
                    <div class="selectlist">
                        <button><span>女频</span></button>
                    </div>
                </div>
                <div class="select">
                    <span class="tname">频道</span>
                    <div class="selectlist1">
                        
                    </div>
                </div>
                <div class="select">
                    <span class="tname">分类</span>
                    <div class="selectlist2">
                      
                    </div>
                </div>
                <div class="select">
                    <span class="tname">字数</span>
                    <div class="selectlist3">
                       
                    </div>
                </div>
                <div class="select">
                    <span class="tname">属性</span>
                    <div class="selectlist4">
                       
                    </div>
                </div>
                <div class="select">
                    <span class="tname">状态</span>
                    <div class="selectlist5">
                       
                    </div>
                </div>
                <div class="select">
                    <span class="tname">更新时间</span>
                    <div class="selectlist6">
                       
                    </div>
                </div>
            </div>
            <div class="rightbar">
                <div class="tab-header">
                    <div style="display: flex;">
                        <div onclick="getapp(event)" class="popRank">
                            <p class="firstname"  href=""></p>
                            <div class="onapp">
                               
                            </div>
                        </div>
                        <div class="tab-item">
                           
                        </div>
                    </div>
                   
                    <div class="tab-num"></div>
                </div>
                <div class="tab-content">
                  
                </div>
                 <div id="demo-laypage-normal-2"></div>
            </div>
        </div>
    </div>
     <div class="footer">
        <div class="footer-default">
            <div>
                <p class="font">
                    <a>磨铁文学旗下网站：</a>
                    <a>来看中文网</a>
                    <a>锦文小说网</a>
                    <a>墨墨言情网</a>
                    <a>逸云书院</a>
                    <br>
                    <a>关于我们</a>
                    <a>联系我们</a>
                    <a>加入我们</a>
                    <a>帮助中心</a>
                    <a>网站地图</a>
                </p>
                <p class="announce">
                    Copyright © 2011-2025 LAIKAN.COM All Rights Reserved.  北京来看科技有限公司 版权所有
                    <br>
                    增值电信业务经营许可证 京B2-20190319  丨  网络出版服务许可
                    证 (署）网出证（京）字第325号  丨  
                    <a>京ICP备17040734号-1</a>
                    <br>
                    <a>网络违法犯罪举报</a>
                    丨
                    <a>中国互联网举报中心</a>
                    丨
                    <a>网络举报APP下载</a>
                    <br>
                </p>
                <div>
                    <a>
                        <img src="https://pic.motieimg.com/web-pc-my3/dist/static/img/guohui.d0289dc.png" alt="">
                        <p>京公网安备 11010202009584号</p>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="rfloat">
        <ul>
            <li class="r-1">
                <a>
                    <p class="rightSpan">最近阅读</p>
                    <!-- <p class="bg"></p> -->
                </a>
            </li>
            <li class="r-2">
                <a>
                    <i></i>
                    <p class="rightSpan">充值</p>
                </a>
            </li>
            <li class="r-3">
                <a>
                    <i></i>
                    <p class="rightSpan">客服</p>
                </a>
            </li>
        </ul>
    </div>
</body>
<script src="./js/b-list.js"></script>
<script src="https://unpkg.com/layui@2.11.5/dist/layui.js"></script>
<script>
// 渲染分页控件
function renderLaypage() {
    const laypage = layui.laypage;
    const laypageElem = 'demo-laypage-normal-2';

    // 调用 Layui laypage 渲染
    laypage.render({
        elem: laypageElem,        // 分页容器ID
        count: pageParams.totalCount, // 总数据量（从接口获取）
        curr: pageParams.pageNo,     // 当前页码
        layout: ['count', 'prev', 'page', 'next', 'skip'], 
        first: '首页',            // 首页文本
        last: '尾页',             // 尾页文本
        prev: '上一页',           // 上一页文本
        next: '下一页',           // 下一页文本
        
        // 页码切换/每页条数变更时触发
        jump: function(obj, first) {
            // first 为 true 时表示“初始渲染”，避免重复加载
            if (!first) {
                // 1. 更新分页参数（页码 + 每页条数）
                pageParams.pageNo = obj.curr;       // 更新当前页码
                pageParams.pageSize = obj.limit;    // 更新每页条数（若用户切换）
                
                // 2. 滚动到列表顶部（优化体验）
                document.querySelector('.tab-content').scrollIntoView({
                    behavior: 'smooth',
                    block: 'start'
                });
                
                // 3. 加载目标页数据（携带当前筛选条件）
                getlist(pageParams.pageNo);
            }
        }
    });
}
</script>
 <script>
        // 搜索
        const newSearch = () => {
            const input = document.querySelector('input')
            const searchLists = document.querySelector('.searchList')
            if (input.value.trim() == '') {
                searchLists.innerHTML = ''
            } else {
                fetch(`https://app2.motie.com/search?objectType=2&word=${input.value}&pageSize=2`).then(res => res.json()).then(res1 => {
                    let datelist = ''
                    searchLists.innerHTML = ''
                    res1.data.bookList.forEach((dates, everys) => {
                        datelist += `
                        <li class="lines">
                            <a href="./yy-bookDetail.html?id=${dates.id}">
                            <div class="imgbox">
                                <img src="${dates.icon}" alt="">
                            </div>
                            <div class="details">
                                <p class="bookName">
                                   ${dates.name}
                                </p>
                                <p class="book-authors">${dates.authorName}</p>
                            </div>
                            </a>
                        </li>
                    `
                    })
                    searchLists.innerHTML = `
                    <li>
                       <a class="about" href="">
                                <p class="noimg">搜“<span>${input.value}</span>”相关作品>></p>
                        </a>
                    </li>
                    ${datelist}      
                `
                }).catch(err => {
                    console.log(err)
                })
            }
        }
        document.addEventListener('click', (event) => {
            const searchLists = document.querySelector('.searchList');
            const searchContainer = document.querySelector('.search');

            // 检查元素是否存在
            if (!searchLists || !searchContainer) return;

            const isClickInsideSearch = searchContainer.contains(event.target) ||
                searchLists.contains(event.target);

            if (!isClickInsideSearch && searchLists.innerHTML.trim() !== '') {
                searchLists.innerHTML = '';
            }
        });
        document.addEventListener('DOMContentLoaded', function () {
            const totop = document.querySelector(".totop");
            if (totop) {
                totop.addEventListener('click', function () {
                    window.scrollTo({
                        top: 0,
                        behavior: 'smooth'
                    });
                });
            }
        });
    </script>
    
</html>